package cn.stylefeng.guns.modular.order.mapper;

import cn.stylefeng.guns.modular.order.entity.OrderWeightBox;
import cn.stylefeng.guns.modular.order.model.params.OrderWeightBoxParam;
import cn.stylefeng.guns.modular.order.model.params.OrderWeightCheckParam;
import cn.stylefeng.guns.modular.order.model.result.OrderWeightBoxResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单包材重量 Mapper 接口
 * </p>
 *
 * @author zhangzh
 * @since 2024-05-29
 */
public interface OrderWeightBoxMapper extends BaseMapper<OrderWeightBox> {

    /**
     * 获取列表
     *
     * @author zhangzh
     * @Date 2024-05-29
     */
    List<OrderWeightBoxResult> customList(@Param("paramCondition") OrderWeightBoxParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zhangzh
     * @Date 2024-05-29
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") OrderWeightBoxParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhangzh
     * @Date 2024-05-29
     */
    Page<OrderWeightBoxResult> customPageList(@Param("page") Page page, @Param("paramCondition") OrderWeightBoxParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author zhangzh
     * @Date 2024-05-29
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") OrderWeightBoxParam paramCondition);

    /**
     * 批量添加
     * @param list
     * @return
     */
    boolean saveBatchList(@Param("list")List<OrderWeightBoxParam> list);
    /**
     * 根据包材编码删除
     * @param boxCode
     * @return
     */
    boolean delByBoxCode(@Param("boxCode") String boxCode);


    /**
     * 根据条码查询信息
     * @param boxCode
     * @return
     */
    OrderWeightBoxResult findByBoxCode(@Param("boxCode") String boxCode);

}
